/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.hl7.v3;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.common.util.Enumerator;

/**
 * <!-- begin-user-doc -->
 * A representation of the literals of the enumeration '<em><b>Image Media Type</b></em>',
 * and utility methods for working with them.
 * <!-- end-user-doc -->
 * <!-- begin-model-doc -->
 * abstDomain: A14839 (C-0-T14824-A14839-cpt)
 * <!-- end-model-doc -->
 * @see org.hl7.v3.V3Package#getImageMediaType()
 * @model extendedMetaData="name='ImageMediaType'"
 * @generated
 */
public enum ImageMediaType implements Enumerator {
	/**
	 * The '<em><b>Image G3fax</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #IMAGE_G3FAX_VALUE
	 * @generated
	 * @ordered
	 */
	IMAGE_G3FAX(0, "imageG3fax", "image/g3fax"),

	/**
	 * The '<em><b>Image Gif</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #IMAGE_GIF_VALUE
	 * @generated
	 * @ordered
	 */
	IMAGE_GIF(1, "imageGif", "image/gif"),

	/**
	 * The '<em><b>Image Jpeg</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #IMAGE_JPEG_VALUE
	 * @generated
	 * @ordered
	 */
	IMAGE_JPEG(2, "imageJpeg", "image/jpeg"),

	/**
	 * The '<em><b>Image Png</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #IMAGE_PNG_VALUE
	 * @generated
	 * @ordered
	 */
	IMAGE_PNG(3, "imagePng", "image/png"),

	/**
	 * The '<em><b>Image Tiff</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #IMAGE_TIFF_VALUE
	 * @generated
	 * @ordered
	 */
	IMAGE_TIFF(4, "imageTiff", "image/tiff");

	/**
	 * The '<em><b>Image G3fax</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Image G3fax</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #IMAGE_G3FAX
	 * @model name="imageG3fax" literal="image/g3fax"
	 * @generated
	 * @ordered
	 */
	public static final int IMAGE_G3FAX_VALUE = 0;

	/**
	 * The '<em><b>Image Gif</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Image Gif</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #IMAGE_GIF
	 * @model name="imageGif" literal="image/gif"
	 * @generated
	 * @ordered
	 */
	public static final int IMAGE_GIF_VALUE = 1;

	/**
	 * The '<em><b>Image Jpeg</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Image Jpeg</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #IMAGE_JPEG
	 * @model name="imageJpeg" literal="image/jpeg"
	 * @generated
	 * @ordered
	 */
	public static final int IMAGE_JPEG_VALUE = 2;

	/**
	 * The '<em><b>Image Png</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Image Png</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #IMAGE_PNG
	 * @model name="imagePng" literal="image/png"
	 * @generated
	 * @ordered
	 */
	public static final int IMAGE_PNG_VALUE = 3;

	/**
	 * The '<em><b>Image Tiff</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Image Tiff</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #IMAGE_TIFF
	 * @model name="imageTiff" literal="image/tiff"
	 * @generated
	 * @ordered
	 */
	public static final int IMAGE_TIFF_VALUE = 4;

	/**
	 * An array of all the '<em><b>Image Media Type</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final ImageMediaType[] VALUES_ARRAY =
		new ImageMediaType[] {
			IMAGE_G3FAX,
			IMAGE_GIF,
			IMAGE_JPEG,
			IMAGE_PNG,
			IMAGE_TIFF,
		};

	/**
	 * A public read-only list of all the '<em><b>Image Media Type</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final List<ImageMediaType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));

	/**
	 * Returns the '<em><b>Image Media Type</b></em>' literal with the specified literal value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static ImageMediaType get(String literal) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			ImageMediaType result = VALUES_ARRAY[i];
			if (result.toString().equals(literal)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Image Media Type</b></em>' literal with the specified name.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static ImageMediaType getByName(String name) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			ImageMediaType result = VALUES_ARRAY[i];
			if (result.getName().equals(name)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Image Media Type</b></em>' literal with the specified integer value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static ImageMediaType get(int value) {
		switch (value) {
			case IMAGE_G3FAX_VALUE: return IMAGE_G3FAX;
			case IMAGE_GIF_VALUE: return IMAGE_GIF;
			case IMAGE_JPEG_VALUE: return IMAGE_JPEG;
			case IMAGE_PNG_VALUE: return IMAGE_PNG;
			case IMAGE_TIFF_VALUE: return IMAGE_TIFF;
		}
		return null;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final int value;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String name;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String literal;

	/**
	 * Only this class can construct instances.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private ImageMediaType(int value, String name, String literal) {
		this.value = value;
		this.name = name;
		this.literal = literal;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getValue() {
	  return value;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getName() {
	  return name;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLiteral() {
	  return literal;
	}

	/**
	 * Returns the literal value of the enumerator, which is its string representation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		return literal;
	}
	
} //ImageMediaType
